package com.dkm.biz.gl.repository.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.gl.domain.Banner;
import com.dkm.biz.gl.persistence.dao.BannerQueryDao;
import com.dkm.biz.gl.persistence.entity.BannerPo;
import com.dkm.biz.gl.repository.BannerRepository;
import com.dkm.biz.repository.AbstractRepository;

/**
 * 对象功能:t_gl_banner Repository接口的实现类
 * 开发公司:HJ.COM
 * 开发人员:ZHH
 * 创建时间:2016-07-06 17:30:34
 */
@Repository
public class BannerRepositoryImpl extends AbstractRepository<String, BannerPo,Banner> implements BannerRepository{
	  
	@Resource
	private  BannerQueryDao bannerQueryDao;

	public Banner newInstance() {
		BannerPo po = new BannerPo();
		Banner banner = SpringHelper.getBean(Banner.class);
		banner.setData(po);
		return banner;
	}

	public Banner newInstance(BannerPo po) {
		Banner banner = SpringHelper.getBean(Banner.class);
		banner.setData(po);
		return banner;
	} 
	
	@Override
	protected IQueryDao<String, BannerPo> getQueryDao() {
		return bannerQueryDao;
	}
	
}
